package com.msh.platform.elm.dao;

import com.msh.platform.elm.entity.WxPubNo;
import javax.transaction.Transactional;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface WxPubNoRepository extends JpaRepository<WxPubNo,Integer> {
	Page<WxPubNo> findBySellerId(int sellerId,Pageable pageable);
	
	@Modifying
    @Transactional
    @Query("update WxPubNo w set w.status = ?1 where w.id = ?2")
    void updateStatus(String status,int id);
}
